import javaService from '../javaHttp'

// function handel(data) {
//   var params = new URLSearchParams()
//   for (const key in data) {
//     params.append(key, data[key])
//   }
//   return params
// }

// 指标类型分类
export function getIndex_Classification(params) {
  return javaService({
    url: `${process.env.VUE_APP_BEG_IP}performance/hkIndexClassify/getHkIndexClassifyPageList`,
    method: 'get',
    params

  })
}
// 指标库岗位
export function getByCondition(params) {
  return javaService({
    url: `${process.env.VUE_APP_BEG_IP}xboot/hontPost/getByCondition`,
    method: 'get',
    params

  })
}
// 指标库查询
export function getindexList(params) {
  return javaService({
    url: `${process.env.VUE_APP_BEG_IP}xboot/hkAssessmentIndex/getByCondition`,
    method: 'get',
    params

  })
}
// 指标项删除
export function deleteIndicatoritem(id) {
  return javaService({
    url: `${process.env.VUE_APP_BEG_IP}xboot/hkAssessmentIndex/delHkAssessmentIndex/${id}`,
    method: 'post'

  })
}
// 指标项新增
export function newIndicators(params) {
  return javaService({
    url: `${process.env.VUE_APP_BEG_IP}xboot/hkAssessmentIndex/saveHkAssessmentIndex`,
    method: 'post',
    params

  })
}
// 指标编辑回显
export function indicatorEcho(params) {
  return javaService({
    url: `${process.env.VUE_APP_BEG_IP}xboot/hkAssessmentIndex/getHkAssessmentIndexDetail`,
    method: 'get',
    params

  })
}
// 指标编辑提交
export function editSubmit(params) {
  return javaService({
    url: `${process.env.VUE_APP_BEG_IP}xboot/hkAssessmentIndex/updateIndex`,
    method: 'PUT',
    params

  })
}

// 指标分类新增
export function newindIcatorClassification(params) {
  return javaService({
    url: `${process.env.VUE_APP_BEG_IP}performance/hkIndexClassify/saveHkIndexClassifyByName`,
    method: 'post',
    params

  })
}
// 指标上传
export function uploadFile(data) {
  return javaService({
    url: `${process.env.VUE_APP_BEG_IP}xboot/hkAssessmentIndex/batchAddIndex`,
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'multipart/form-data'
    }

  })
}
